<template>
  <div id="app">
    <h3>请选择喜欢的专栏</h3>
    <span
      v-for="(str, idx) in loves"
      :key="idx">
      <input type="checkbox" v-model="selected" :value="str">
      {{ str }}
    </span>
    <ul>
      <li v-for="(str, idx) in selected" :key="idx">{{ str }}</li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      loves: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      selected: []
    }
  }
}
</script>

<style>

</style>